<template>
  <div class="collect-page">
    <van-search
      placeholder="请输入搜索关键词"
      background="#4fc08d"
      shape="round"
    >
      <template #label>
        <div>上海</div>
      </template>
    </van-search>
    <!-- <van-list
      v-model="loading"
      :finished="finished"
      finished-text="没有更多了"
      @load="onLoad"
    > -->
    <HouseList :info="info"></HouseList>
  </div>
</template>

<script>
import { getHomeList } from '@/api/user'
import HouseList from '@/components/HouseList.vue'
export default {
  name: 'collect-page',
  data () {
    return {
      info: []
    }
  },
  async created () {
    const cityId = this.$route.params.cityId
    const data = await getHomeList(cityId)
    // console.log(data)
    this.info = data.body.list
    // console.log(this.info)
    this.info.forEach(
      item => (item.houseImg = 'http://liufusong.top:8080' + item.houseImg)
    )
  },
  methods: {},
  components: {
    HouseList
  }
}
</script>

<style lang="less" scoped></style>
